/**
 * 
 */
package metalink.student;

import java.util.ArrayList;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

import model.admin.StudentFinanceMo;
import vo.StudentFinancialsVo;

/**
 * @author Sony
 *
 */
public class GetFinancialDetails extends ActionSupport{
	ArrayList<StudentFinancialsVo> list = new ArrayList<StudentFinancialsVo>();
	ArrayList<StudentFinancialsVo> onetime = new ArrayList<StudentFinancialsVo>();
int student_id;
int total_fee,total_fee_paid;
	public String execute() {
		HttpSession session;
		session = ServletActionContext.getRequest().getSession();
		student_id=(int) session.getAttribute("user_id");
		StudentFinanceMo mo = new StudentFinanceMo();
		list = mo.getStudentFinancials(student_id);
		onetime=mo.getOneTimeFinancials(student_id);
		total_fee=mo.getTotalFee(student_id);
		total_fee_paid=mo.getTotalFeePaid(student_id);
		setTotal_fee(total_fee);
		setTotal_fee_paid(total_fee_paid);
		setStudent_id(student_id);
		return SUCCESS;
	}

	public int getTotal_fee() {
		return total_fee;
	}

	public void setTotal_fee(int total_fee) {
		this.total_fee = total_fee;
	}

	public int getTotal_fee_paid() {
		return total_fee_paid;
	}

	public void setTotal_fee_paid(int total_fee_paid) {
		this.total_fee_paid = total_fee_paid;
	}

	public ArrayList<StudentFinancialsVo> getOnetime() {
		return onetime;
	}

	public void setOnetime(ArrayList<StudentFinancialsVo> onetime) {
		this.onetime = onetime;
	}

	public int getStudent_id() {
		return student_id;
	}

	public void setStudent_id(int student_id) {
		this.student_id = student_id;
	}

	public ArrayList<StudentFinancialsVo> getList() {
		return list;
	}

	public void setList(ArrayList<StudentFinancialsVo> list) {
		this.list = list;
	}
}
